//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Cloud9 service.
///
/// Cloud9 Cloud9 is a collection of tools that you can use to code, build, run, test, debug, and release software in the cloud. For more information about Cloud9, see the Cloud9 User Guide.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"   Cloud9 supports these operations:    CreateEnvironmentEC2: Creates an Cloud9 development environment, launches an Amazon EC2 instance, and then connects from the instance to the environment.    CreateEnvironmentMembership: Adds an environment member to an environment.    DeleteEnvironment: Deletes an environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.    DeleteEnvironmentMembership: Deletes an environment member from an environment.    DescribeEnvironmentMemberships: Gets information about environment members for an environment.    DescribeEnvironments: Gets information about environments.    DescribeEnvironmentStatus: Gets status information for an environment.    ListEnvironments: Gets a list of environment identifiers.    ListTagsForResource: Gets the tags for an environment.    TagResource: Adds tags to an environment.    UntagResource: Removes tags from an environment.    UpdateEnvironment: Changes the settings of an existing environment.    UpdateEnvironmentMembership: Changes the settings of an existing environment member for an environment.
public struct Cloud9: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Cloud9 client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "AWSCloud9WorkspaceManagementService",
            serviceName: "Cloud9",
            serviceIdentifier: "cloud9",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2017-09-23",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: Cloud9ErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "cloud9.af-south-1.api.aws",
            "ap-east-1": "cloud9.ap-east-1.api.aws",
            "ap-northeast-1": "cloud9.ap-northeast-1.api.aws",
            "ap-northeast-2": "cloud9.ap-northeast-2.api.aws",
            "ap-northeast-3": "cloud9.ap-northeast-3.api.aws",
            "ap-south-1": "cloud9.ap-south-1.api.aws",
            "ap-southeast-1": "cloud9.ap-southeast-1.api.aws",
            "ap-southeast-2": "cloud9.ap-southeast-2.api.aws",
            "ca-central-1": "cloud9.ca-central-1.api.aws",
            "eu-central-1": "cloud9.eu-central-1.api.aws",
            "eu-north-1": "cloud9.eu-north-1.api.aws",
            "eu-south-1": "cloud9.eu-south-1.api.aws",
            "eu-west-1": "cloud9.eu-west-1.api.aws",
            "eu-west-2": "cloud9.eu-west-2.api.aws",
            "eu-west-3": "cloud9.eu-west-3.api.aws",
            "il-central-1": "cloud9.il-central-1.api.aws",
            "me-south-1": "cloud9.me-south-1.api.aws",
            "sa-east-1": "cloud9.sa-east-1.api.aws",
            "us-east-1": "cloud9.us-east-1.api.aws",
            "us-east-2": "cloud9.us-east-2.api.aws",
            "us-west-1": "cloud9.us-west-1.api.aws",
            "us-west-2": "cloud9.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "ca-central-1": "cloud9-fips.ca-central-1.api.aws",
            "us-east-1": "cloud9-fips.us-east-1.api.aws",
            "us-east-2": "cloud9-fips.us-east-2.api.aws",
            "us-west-1": "cloud9-fips.us-west-1.api.aws",
            "us-west-2": "cloud9-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "ca-central-1": "cloud9-fips.ca-central-1.amazonaws.com",
            "us-east-1": "cloud9-fips.us-east-1.amazonaws.com",
            "us-east-2": "cloud9-fips.us-east-2.amazonaws.com",
            "us-west-1": "cloud9-fips.us-west-1.amazonaws.com",
            "us-west-2": "cloud9-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates an Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func createEnvironmentEC2(_ input: CreateEnvironmentEC2Request, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateEnvironmentEC2Result {
        try await self.client.execute(
            operation: "CreateEnvironmentEC2", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - automaticStopTimeMinutes: The number of minutes until the running instance is shut down after the environment has last been used.
    ///   - clientRequestToken: A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time. For more information, see Client Tokens in the Amazon EC2 API Reference.
    ///   - connectionType: The connection type used for connecting to an Amazon EC2 environment. Valid values are CONNECT_SSH (default) and CONNECT_SSM (connected through Amazon EC2 Systems Manager). For more information, see Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager in the Cloud9 User Guide.
    ///   - description: The description of the environment to create.
    ///   - dryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
    ///   - imageId: The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. To choose an AMI for the instance, you must specify a valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.  We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported. From December 16, 2024, Ubuntu 18.04 will be removed from the list of available imageIds for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users. Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.  AMI aliases     Amazon Linux 2: amazonlinux-2-x86_64    Amazon Linux 2023 (recommended): amazonlinux-2023-x86_64    Ubuntu 18.04: ubuntu-18.04-x86_64    Ubuntu 22.04: ubuntu-22.04-x86_64     SSM paths    Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64    Amazon Linux 2023 (recommended): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64    Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64    Ubuntu 22.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64
    ///   - instanceType: The type of instance to connect to the environment (for example, t2.micro).
    ///   - name: The name of the environment to create. This name is visible to other IAM users in the same Amazon Web Services account.
    ///   - ownerArn: The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any IAM principal. If this value is not specified, the ARN defaults to this environment's creator.
    ///   - subnetId: The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.
    ///   - tags: An array of key-value pairs that will be associated with the new Cloud9 development environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func createEnvironmentEC2(
        automaticStopTimeMinutes: Int? = nil,
        clientRequestToken: String? = nil,
        connectionType: ConnectionType? = nil,
        description: String? = nil,
        dryRun: Bool? = nil,
        imageId: String,
        instanceType: String,
        name: String,
        ownerArn: String? = nil,
        subnetId: String? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateEnvironmentEC2Result {
        let input = CreateEnvironmentEC2Request(
            automaticStopTimeMinutes: automaticStopTimeMinutes, 
            clientRequestToken: clientRequestToken, 
            connectionType: connectionType, 
            description: description, 
            dryRun: dryRun, 
            imageId: imageId, 
            instanceType: instanceType, 
            name: name, 
            ownerArn: ownerArn, 
            subnetId: subnetId, 
            tags: tags
        )
        return try await self.createEnvironmentEC2(input, logger: logger)
    }

    /// Adds an environment member to an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func createEnvironmentMembership(_ input: CreateEnvironmentMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateEnvironmentMembershipResult {
        try await self.client.execute(
            operation: "CreateEnvironmentMembership", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an environment member to an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment that contains the environment member you want to add.
    ///   - permissions: The type of environment member permissions you want to associate with this environment member. Available values include:    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.
    ///   - userArn: The Amazon Resource Name (ARN) of the environment member you want to add.
    ///   - logger: Logger use during operation
    @inlinable
    public func createEnvironmentMembership(
        environmentId: String,
        permissions: MemberPermissions,
        userArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateEnvironmentMembershipResult {
        let input = CreateEnvironmentMembershipRequest(
            environmentId: environmentId, 
            permissions: permissions, 
            userArn: userArn
        )
        return try await self.createEnvironmentMembership(input, logger: logger)
    }

    /// Deletes an Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func deleteEnvironment(_ input: DeleteEnvironmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteEnvironmentResult {
        try await self.client.execute(
            operation: "DeleteEnvironment", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteEnvironment(
        environmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteEnvironmentResult {
        let input = DeleteEnvironmentRequest(
            environmentId: environmentId
        )
        return try await self.deleteEnvironment(input, logger: logger)
    }

    /// Deletes an environment member from a development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func deleteEnvironmentMembership(_ input: DeleteEnvironmentMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteEnvironmentMembershipResult {
        try await self.client.execute(
            operation: "DeleteEnvironmentMembership", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an environment member from a development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment to delete the environment member from.
    ///   - userArn: The Amazon Resource Name (ARN) of the environment member to delete from the environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteEnvironmentMembership(
        environmentId: String,
        userArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteEnvironmentMembershipResult {
        let input = DeleteEnvironmentMembershipRequest(
            environmentId: environmentId, 
            userArn: userArn
        )
        return try await self.deleteEnvironmentMembership(input, logger: logger)
    }

    /// Gets information about environment members for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func describeEnvironmentMemberships(_ input: DescribeEnvironmentMembershipsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeEnvironmentMembershipsResult {
        try await self.client.execute(
            operation: "DescribeEnvironmentMemberships", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about environment members for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment to get environment member information about.
    ///   - maxResults: The maximum number of environment members to get information about.
    ///   - nextToken: During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
    ///   - permissions: The type of environment member permissions to get information about. Available values include:    owner: Owns the environment.    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.   If no value is specified, information about all environment members are returned.
    ///   - userArn: The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeEnvironmentMemberships(
        environmentId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        permissions: [Permissions]? = nil,
        userArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeEnvironmentMembershipsResult {
        let input = DescribeEnvironmentMembershipsRequest(
            environmentId: environmentId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            permissions: permissions, 
            userArn: userArn
        )
        return try await self.describeEnvironmentMemberships(input, logger: logger)
    }

    /// Gets status information for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func describeEnvironmentStatus(_ input: DescribeEnvironmentStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeEnvironmentStatusResult {
        try await self.client.execute(
            operation: "DescribeEnvironmentStatus", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets status information for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment to get status information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeEnvironmentStatus(
        environmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeEnvironmentStatusResult {
        let input = DescribeEnvironmentStatusRequest(
            environmentId: environmentId
        )
        return try await self.describeEnvironmentStatus(input, logger: logger)
    }

    /// Gets information about Cloud9 development environments.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func describeEnvironments(_ input: DescribeEnvironmentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeEnvironmentsResult {
        try await self.client.execute(
            operation: "DescribeEnvironments", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about Cloud9 development environments.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentIds: The IDs of individual environments to get information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeEnvironments(
        environmentIds: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeEnvironmentsResult {
        let input = DescribeEnvironmentsRequest(
            environmentIds: environmentIds
        )
        return try await self.describeEnvironments(input, logger: logger)
    }

    /// Gets a list of Cloud9 development environment identifiers.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"    Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func listEnvironments(_ input: ListEnvironmentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEnvironmentsResult {
        try await self.client.execute(
            operation: "ListEnvironments", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a list of Cloud9 development environment identifiers.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"    Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of environments to get identifiers for.
    ///   - nextToken: During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEnvironments(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEnvironmentsResult {
        let input = ListEnvironmentsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEnvironments(input, logger: logger)
    }

    /// Gets a list of the tags associated with an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a list of the tags associated with an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the Cloud9 development environment to get the tags for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Adds tags to an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"    Tags that you add to an Cloud9 environment by using this method will NOT be automatically propagated to underlying resources.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds tags to an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"    Tags that you add to an Cloud9 environment by using this method will NOT be automatically propagated to underlying resources.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the Cloud9 development environment to add tags to.
    ///   - tags: The list of tags to add to the given Cloud9 development environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes tags from an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes tags from an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.
    ///   - tagKeys: The tag names of the tags to remove from the given Cloud9 development environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Changes the settings of an existing Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func updateEnvironment(_ input: UpdateEnvironmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateEnvironmentResult {
        try await self.client.execute(
            operation: "UpdateEnvironment", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Changes the settings of an existing Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - description: Any new or replacement description for the environment.
    ///   - environmentId: The ID of the environment to change settings.
    ///   - managedCredentialsAction: Allows the environment owner to turn on or turn off the Amazon Web Services managed temporary credentials for an Cloud9 environment by using one of the following values:    ENABLE     DISABLE     Only the environment owner can change the status of managed temporary credentials. An AccessDeniedException is thrown if an attempt to turn on or turn off managed temporary credentials is made by an account that's not the environment owner.
    ///   - name: A replacement name for the environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateEnvironment(
        description: String? = nil,
        environmentId: String,
        managedCredentialsAction: ManagedCredentialsAction? = nil,
        name: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateEnvironmentResult {
        let input = UpdateEnvironmentRequest(
            description: description, 
            environmentId: environmentId, 
            managedCredentialsAction: managedCredentialsAction, 
            name: name
        )
        return try await self.updateEnvironment(input, logger: logger)
    }

    /// Changes the settings of an existing environment member for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    @Sendable
    @inlinable
    public func updateEnvironmentMembership(_ input: UpdateEnvironmentMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateEnvironmentMembershipResult {
        try await self.client.execute(
            operation: "UpdateEnvironmentMembership", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Changes the settings of an existing environment member for an Cloud9 development environment.  Cloud9 is no longer available to new customers. Existing customers of  Cloud9 can continue to use the service as normal.  Learn more"
    ///
    /// Parameters:
    ///   - environmentId: The ID of the environment for the environment member whose settings you want to change.
    ///   - permissions: The replacement type of environment member permissions you want to associate with this environment member. Available values include:    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.
    ///   - userArn: The Amazon Resource Name (ARN) of the environment member whose settings you want to change.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateEnvironmentMembership(
        environmentId: String,
        permissions: MemberPermissions,
        userArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateEnvironmentMembershipResult {
        let input = UpdateEnvironmentMembershipRequest(
            environmentId: environmentId, 
            permissions: permissions, 
            userArn: userArn
        )
        return try await self.updateEnvironmentMembership(input, logger: logger)
    }
}

extension Cloud9 {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Cloud9, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Cloud9 {
    /// Return PaginatorSequence for operation ``describeEnvironmentMemberships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeEnvironmentMembershipsPaginator(
        _ input: DescribeEnvironmentMembershipsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeEnvironmentMembershipsRequest, DescribeEnvironmentMembershipsResult> {
        return .init(
            input: input,
            command: self.describeEnvironmentMemberships,
            inputKey: \DescribeEnvironmentMembershipsRequest.nextToken,
            outputKey: \DescribeEnvironmentMembershipsResult.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeEnvironmentMemberships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - environmentId: The ID of the environment to get environment member information about.
    ///   - maxResults: The maximum number of environment members to get information about.
    ///   - permissions: The type of environment member permissions to get information about. Available values include:    owner: Owns the environment.    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.   If no value is specified, information about all environment members are returned.
    ///   - userArn: The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeEnvironmentMembershipsPaginator(
        environmentId: String? = nil,
        maxResults: Int? = nil,
        permissions: [Permissions]? = nil,
        userArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeEnvironmentMembershipsRequest, DescribeEnvironmentMembershipsResult> {
        let input = DescribeEnvironmentMembershipsRequest(
            environmentId: environmentId, 
            maxResults: maxResults, 
            permissions: permissions, 
            userArn: userArn
        )
        return self.describeEnvironmentMembershipsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listEnvironments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentsPaginator(
        _ input: ListEnvironmentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEnvironmentsRequest, ListEnvironmentsResult> {
        return .init(
            input: input,
            command: self.listEnvironments,
            inputKey: \ListEnvironmentsRequest.nextToken,
            outputKey: \ListEnvironmentsResult.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEnvironments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of environments to get identifiers for.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEnvironmentsRequest, ListEnvironmentsResult> {
        let input = ListEnvironmentsRequest(
            maxResults: maxResults
        )
        return self.listEnvironmentsPaginator(input, logger: logger)
    }
}

extension Cloud9.DescribeEnvironmentMembershipsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Cloud9.DescribeEnvironmentMembershipsRequest {
        return .init(
            environmentId: self.environmentId,
            maxResults: self.maxResults,
            nextToken: token,
            permissions: self.permissions,
            userArn: self.userArn
        )
    }
}

extension Cloud9.ListEnvironmentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Cloud9.ListEnvironmentsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
